package com.gls.security.server.authorization.jpa.entity;

import com.gls.starter.data.jpa.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

/**
 * 账户角色关系表
 *
 * @author lizhiyong
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
public class AccountRole extends BaseEntity {

    /**
     * 用户
     */
    @ManyToOne
    private Account account;

    /**
     * 角色
     */
    @ManyToOne
    private Role role;
}
